﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BindList.aspx.cs" Inherits="MxWeiXinPF.Web.weixin.jiaoshuifei.BindList" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <link href="css/weui.min.css?v=2" rel="stylesheet" />
    <link href="css/jquery-weui.min.css" rel="stylesheet" />
    <link href="css/demos.css" rel="stylesheet" />


    <title>绑定列表</title>
</head>
<body ontouchstart>
 

    <%if (list != null && list.Count > 0)
        {
            foreach (var item in list)
            {%>
    <div class="weui-form-preview">
        <div class="weui-form-preview__hd">
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">户名</label>
                <em class="weui-form-preview__value"><%=item.consName%></em>
            </div>
        </div>
        <div class="weui-form-preview__bd">
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label">户号</label>
                <span class="weui-form-preview__value"><%=item.consNo%></span>
            </div>

        </div>

        <div class="weui-form-preview__ft">
            <a class="weui-form-preview__btn weui-form-preview__btn_primary" href="javascript:" onclick="unbind('<%= item.consNo%>')">解绑</a>
        </div>
    </div>
    <br>
    <% }
         } %>
       <div class='demos-content-padded'>

        <a class="weui-btn weui-btn_primary" href="http://chunyin.uweixin.cn/weixin/jiaoshuifei/bindone.aspx?wid=<%=wid %>" id="showTooltips" >添加账号</a>
    </div>
</body>
<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>

<script src="js/jquery-weui.js"></script>

<script>
    function unbind(usernumber) {
        $.ajax({
            type: "post",
            url: "jsf_bindOne.ashx",
            data: { actionType: "unbind", usernumber: usernumber, wid: '<%=wid%>', openid: '<%=openid%>' },
            beforeSend: function () {
                $.showLoading();
            },
            success: function (data) {
                if (data.succuss == 1) {
                    $.hideLoading();
                    window.location.reload();
                }
                else {
                    $.hideLoading();
                    $.toptip(data.msg);

                }

            }
        });
    }
</script>
</html>
